package com.atguigu.lease.common.login;

public class LoginUserHolder {

    public static ThreadLocal<LoginUser> loginUserThreadLocal = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser) {
        loginUserThreadLocal.set(loginUser);
    }

    public static LoginUser getLoginUser() {
        return loginUserThreadLocal.get();
    }

    public static void remove() {
        loginUserThreadLocal.remove();
    }
}
